﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;

namespace shop.util
{
    public class JsonUtil
    {
      private  static JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
        public static string getJsonString(object obj) {            
            return jsonSerializer.Serialize(obj);
        }

        public static Object ConvertJsonStringToObject(string json)
        {
            return jsonSerializer.Deserialize<Object>(json);         
        }
    }

}